let obj={
    abc:123,
    abc:456
}
console.log(obj.abc);

let sy1=Symbol('abc');
let sy2=Symbol('abc');
console.log(sy1===sy2);
console.log(sy1);
let sy3=Symbol.for('abc');
let sy4=Symbol.for('abc');
console.log(sy3===sy4);

let o=Symbol.for('abc');
let obj1={
    abc:'111',
    [o]:'222'
}
console.log(obj1.abc);
console.log(obj1);
for (let [key,val] of Object.entries(obj1)){
    console.log(key,val);
}
//以上遍历不能拿到symbol的内容

Object.getOwnPropertySymbols(obj1).forEach(item=>{
    console.log(obj1[item])
})
//以上方法可以拿到symbol的内容

Reflect.ownKeys(obj1).forEach(item=>{
    console.log(obj1[item])
})